<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>文章管理</title>
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/easyui/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/easyui/themes/icon.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/cms.css" />

	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/easyui/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath() %>/js/win.js"></script>
	<script type="text/javascript">
		
		function deleteArticles(){
			checkSelectSomeDoAction("#dg", "删除", "文章", "<%=request.getContextPath() %>/article/deleteArticles.do", true);
		}
		
		function publish(act){
			var action = "";
			if(act == "1"){
				action = "发布";
			} else {
				action = "取消发布";
			}
			checkSelectSomeDoAction("#dg", action, "文章", "<%=request.getContextPath() %>/article/publish.do?act="+act, true);
		}
		
	</script>
</head>
<body>
	<div class="dg-content">
		<table id="dg" class="easyui-datagrid" title="文章列表"
			data-options="rownumbers:true,pagination:true,
				fitColumns:true,iconCls:'icon-users',toolbar:'#toolbar',url:'<%=request.getContextPath() %>/article/listArticle.do'">
			<thead>
				<tr>
					<th data-options="field:'ck',checkbox:true"></th>
					<th data-options="field:'id',hidden:true"></th>
					<th data-options="field:'hrefTitle',width:120,align:'left'">标题</th>
					<th data-options="field:'writeDateStr',width:40,align:'center'">日期</th>
					<!-- <th data-options="field:'authorName',width:40,align:'center'">作者</th> -->
					<th data-options="field:'columnName',width:40,align:'center'">栏目</th>
					<th data-options="field:'stateStr',width:40,align:'center'">状态</th>
				</tr>
			</thead>
		</table>
		<div class='dg-toolbar' id="toolbar" style="padding:5px 10px;">
			<a href="<%=request.getContextPath() %>/article/writeArticle.do" class="easyui-linkbutton" iconCls="icon-add" plain="true">编写</a>
			<a href="javascript:deleteArticles()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
			<a href="javascript:publish(1)" class="easyui-linkbutton" iconCls="icon-remove" plain="true">发布</a>
			<a href="javascript:publish(2)" class="easyui-linkbutton" iconCls="icon-remove" plain="true">取消发布</a>
		</div>
	</div>
	
</body>
</html>